package com.qiaoanju.back.service.impl.system;

import com.qiaoanju.back.dao.system.IDictDao;
import com.qiaoanju.back.domain.system.DictModel;
import com.qiaoanju.back.service.system.IDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by eversec on 2017/10/21.
 */
@Service
public class DictServiceImpl implements IDictService{

    @Autowired
    private IDictDao dao ;

    /**
     * @param dict
     * @return
     */
    public int insert(DictModel dict) {
        return dao.insert(dict);
    }

    /**
     * 获取字典列表数据
     * @param params
     * @return
     */
    public List<DictModel> getDictsList(Map<String ,Object> params) {
        return dao.getDictsList(params);
    }

    /**
     * @param id
     * @return
     */
    public int deleteById(int id) {
        return dao.deleteById(id);
    }

    /**
     * @param id
     * @return
     */
    public DictModel getDictById(int id) {
        return dao.getDictById(id);
    }

    /**
     * @param editModel
     * @return
     */
    public boolean edit(DictModel editModel) {
        return dao.edit(editModel);
    }

    /**
     * @param ids
     * @return
     */
    public int deleteByIds(int[] ids) {
        return dao.deleteByIds(ids);
    }
}
